<?php
namespace app\index\controller;
use app\index\controller\Rest;
class SendMsg
{
	
	//主帐号
	public $accountSid= '8a216da85f9fd676015fc760a14b1290';
	//主帐号Token
	public $accountToken= '3cd8ceebb7e8448bb6239b2b7b353b33';
	//应用Id
	public $appId='8a216da85f9fd676015fc760a1a41297';
	//请求地址，格式如下，不需要写https://
	public $serverIP='app.cloopen.com';
	//请求端口 
	public $serverPort='8883';
	//REST版本号
	public $softVersion='2013-12-26';

	function sendTemplateSMS($to,$datas,$tempId)
	{
	     $rest = new REST($this->serverIP,$this->serverPort,$this->softVersion);
	     $rest->setAccount($this->accountSid,$this->accountToken);
	     $rest->setAppId($this->appId);
	    
	     $result = $rest->sendTemplateSMS($to,$datas,$tempId);

	}
	
}